<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button>点击</button>
  
</body>
</html>
<script>
  const btn = document.querySelector("button")
  btn.addEventListener("click",(event)=>{
    //方式1：event作为参数传入
    console.log(event)
    //方式2：通过window.event获取
    let winEvent = window.event;
    console.log(winEvent)
    //判断两种方式获取的event是否相同
    console.log(event === winEvent)
  })
</script>